package org.ehe.system.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.ehe.system.domain.HrEmployeeAttachment;

import java.util.Date;

/**
 * 员工附件业务对象 hr_employee_attachment
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = HrEmployeeAttachment.class, reverseConvertGenerate = false)
public class HrEmployeeAttachmentBo extends BaseEntity {

    /**
     * 附件ID
     */
    @NotNull(message = "附件ID不能为空", groups = { EditGroup.class })
    private Long attachmentId;

    /**
     * 员工ID
     */
    @NotNull(message = "员工ID不能为空", groups = { EditGroup.class })
    private Long employeeId;

    /**
     * 工号
     */
    @NotBlank(message = "工号不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(max = 50, message = "工号长度不能超过{max}个字符")
    private String employeeNo;

    /**
     * 附件类型（1学历证书 2职业证书 3劳动合同 4身份证 5其他）
     */
    @NotBlank(message = "附件类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String attachmentType;

    /**
     * 附件名称
     */
    @NotBlank(message = "附件名称不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(max = 200, message = "附件名称长度不能超过{max}个字符")
    private String attachmentName;

    /**
     * 文件原名
     */
    @Size(max = 200, message = "文件原名长度不能超过{max}个字符")
    private String fileName;

    /**
     * 文件路径
     */
    @NotBlank(message = "文件路径不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(max = 500, message = "文件路径长度不能超过{max}个字符")
    private String fileUrl;

    /**
     * 文件大小（字节）
     */
    private Long fileSize;

    /**
     * 文件类型
     */
    @Size(max = 50, message = "文件类型长度不能超过{max}个字符")
    private String fileType;

    /**
     * 上传时间
     */
    private Date uploadTime;

    /**
     * 有效期开始日期
     */
    private Date validStartDate;

    /**
     * 有效期结束日期
     */
    private Date validEndDate;

    /**
     * 是否加密（0否 1是）
     */
    private String isEncrypted;

}
